﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CarManage_RejectedModeWebForm.aspx.cs" Inherits="Anke.SHManage.Web.Reports.CarManage_RejectedModeWebForm" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <title>车辆报废统计</title>
    <script src="../Content/EasyUI/jquery.js"></script>
    <script src="../Content/EasyUI/jquery.easyui.js"></script>
    <script src="../Content/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="../Content/EasyUI/themes/icon.css" rel="stylesheet" />
    <link href="../Content/EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <script src="../Scripts/jquery.AnkeExtend.js"></script>
    <script type="text/javascript">
        //页面加载
        $(document).ready(function () {
            DisableBackspace();
            reload();
        });
        function fillCombobox() {

            //取所属分中心的下拉框的值
            $("#Center").combobox({
                url: "../BB/AllDictionary/GetCenterName",
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                multiple: true,
                prompt: '--请选择--',
                onSelect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false,
                        onSelect: function () {
                            $('#Station').combobox('getValues')
                        },
                        onUnselect: function () {
                            $('#Station').combobox('getValues')
                        }
                    });
                    $("#Station").combobox('clear');
                },
                onUnselect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false

                    });

                    $("#Station").combobox('clear');
                },
            });

            var centers = $('#Center').combobox('getValues');
            $("#Station").combobox({
                url: "../BB/AllDictionary/GetSationName?centerID=" + centers,
                method: 'POST',
                valueField: 'ID',
                textField: 'Name',
                multiple: true,
                editable: false,
                onSelect: function () {
                    $('#Station').combobox('getValues')
                },
                onUnselect: function () {
                    $('#Station').combobox('getValues')
                }
            });





        }

        // 实现UpdatePanel中可以再添加easyUI的样式
        function reload() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }
        function EndRequestHandler() {
            fillCombobox();


            $('#StartDate').datetimebox();
            $('#EndDate').datetimebox();
            //$('#txtAgentWorkID').textbox();
            //$('#txtDoctorAndNurse').textbox();
            //$('#txtMeasures').textbox();
            //$('#txtFirstImpression').textbox();
            //$('#txtSendAddress').textbox();
        }

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
                   <table>
                        <tr>
                            <td>查询时间：</td>
                            <td>
                                <asp:TextBox ID="StartDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                            </td>
                            <td style="text-align: center">至</td>
                            <td>
                                <asp:TextBox ID="EndDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                            </td>


                            <td style="text-align: right">分中心：</td>
                            <td>
                                <asp:TextBox ID="Center" class="easyui-combobox" Style="width: 100px" runat="server"></asp:TextBox>

                            </td>
                            <td style="text-align: right">分站：</td>
                            <td>
                                <asp:TextBox ID="Station" class="easyui-combobox" Style="width: 100px" runat="server"></asp:TextBox>

                            </td>
                            <td>
                                <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                            </td>

                        </tr>

                    </table>
              </ContentTemplate>
        </asp:UpdatePanel>

            <div style="background-color: #fafafa; border-left: 1px solid scrollbar; height: 100%;">
                <rsweb:ReportViewer ID="ReportViewer1"   Width="100%" Height="100%"  runat="server"  SizeToReportContent="True"></rsweb:ReportViewer>
                </div>
    </div>
    </form>
</body>
</html>
